using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;

namespace Old.KenEgozi.Com.Domain.Blog
{
	[ActiveRecord("Blog_Authors", Lazy=true)]
	public class Author : BlogBase<Author>
	{
		private string _email;
		private string _username;
		private string _password;
		private IList<Blog> _blogs = new List<Blog>();

		[Property]
		public virtual string Email
		{
			get { return _email; }
			set { _email = value; }
		}

		[Property]
		public virtual string Username
		{
			get { return _username; }
			set { _username = value; }
		}

		[Property]
		public virtual string Password
		{
			get { return _password; }
			set { _password = value; }
		}

		[HasAndBelongsToMany(
			Lazy = true,
			Table = "Blog_BlogAuthors",
			ColumnKey = "AuthorId",
			ColumnRef = "BlogId",
			Access = PropertyAccess.NosetterCamelcaseUnderscore)]
		public virtual IList<Blog> Blogs
		{
			get { return _blogs; }
		}

	}
}
